﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="red_exchange.aspx.cs" Inherits="red_exchange" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>【彩票红包兑换】</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <style type="text/css">
        html {}
        html, body{overflow-x: hidden; overflow-y: auto;}
        body,td,th {font-size: 12px;color:#333;}
        body {margin-left: 0px; margin-top: 0px; font-family:Microsoft YaHei;} 
        a:link {color:#333;text-decoration: none;}
        a:visited {text-decoration: none;color:#333;}
        a:hover {text-decoration: none;color: #F00;}
        a:active {text-decoration: none;color:#333;}
        * { margin:0; padding:0;}
        ul { list-style-type:none; }
        img { border:0; }
        input,textarea:focus {outline: none;}
        /*Main Css End*/ 
        .red_box { padding:25px 10px; width:461px; height:250px; background:url(../images/2015102002.png) no-repeat;}
        .red_box h2 { font-size:20px; color:#0195DF; font-weight:normal; padding:0 40px;}
        .red_box p { font-size:14px; color:#5A5A5A; line-height:30px; padding:0 40px;}
        .red_pay{ margin:10px 10px 20px 10px; background:#E5F1FB; height:26px; font-size:14px; line-height:26px; padding:22px 30px; font-weight:bold;}
        .pay_input { width:160px; height:26px; border:1px solid #D9D9D9; background:#FFF;}
        .pay_btn { margin:0 auto; width:107px; height:40px; border:none; background:url(../images/2015102003.jpg); display:block; cursor:pointer;}
        </style>
        <div class="red_box">
            <h2>提示信息</h2>
            <p><b>兑换商品：</b><%=pro != null?pro.Title:"暂无" %></p>
            <p><b>消耗积分：</b><%=pro != null?pro.Price:0 %>积分</p>
            <div class="red_pay">
            <link type="text/css" rel="stylesheet" media="all" href="../css/keyboard.css" />
            <script type="text/javascript" src="../js/jquery.min.js"></script>
            <script type="text/javascript" src="../js/keyboard.js"></script>
            <form action="#testform" method="GET">
                支付密码：
                <input type="password" class="pay_input keyboard" id="txtPass" /> 
            </form>
            <script type="text/javascript">
                $(function () {
                    $('.keyboard').keyboard({
                        lang: 'en'
                    });
                })
	            </script>
            </div>
            <input type="button" class="pay_btn" onclick="javascript:Exchange(<%=pro != null?pro.Id:0 %>);"/> 
        </div> 
    </div> 
    </form>
    <script language="javascript" type="text/javascript">
        function Exchange(id) { 
            $.post("../Ajax/Exchange.aspx", { proid: id, zhifupass: jQuery('#txtPass').val() }, function (data) {
                if (data == "sucess") {
                    alert("兑换成功!");
                    top.window.location.href = '/integral/integral_index.aspx?p=1';
                } else {
                    alert(data); 
                }
            }, "text");
        }
    </script>
</body>
</html>

